package com.docmgmt.mvp.dto;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * 文件夹权限VO
 *
 * @author Dora
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class FolderPermissionVO {

    /**
     * 权限ID
     */
    private Long id;

    /**
     * 文件夹ID
     */
    private Long folderId;

    /**
     * 授权对象类型：user/department/user_group/all
     */
    private String subjectType;

    /**
     * 授权对象ID（all时为NULL）
     */
    private Long subjectId;

    /**
     * 授权对象名称（用户名/部门名/组名）
     */
    private String subjectName;

    /**
     * 权限级别：read/write/admin/owner
     */
    private String permission;

    /**
     * 是否继承自父文件夹
     */
    private Boolean isInherited;

    /**
     * 继承自哪个父文件夹ID
     */
    private Long inheritFrom;

    /**
     * 继承自哪个路径
     */
    private String inheritFromPath;

    /**
     * 细粒度权限（v3.0）
     */
    private Boolean canRead;
    private Boolean canWrite;
    private Boolean canDelete;
    private Boolean canShare;
    private Boolean canManagePermission;

    /**
     * 优先级
     */
    private Integer priority;

    /**
     * 创建人ID
     */
    private Long createdBy;

    /**
     * 创建时间
     */
    private LocalDateTime createdAt;
}
